/**
 * 我的商友录-获取商友列表
 */
function apiGetCardList(data) {
  console.log("apiGetCardList", data);
  return new Promise((resolve, reject) => {
    const res = {
      code: 200,
      data: [
        {
          id: "1042359",
          name: "张志明",
          position: "业务部总经理",
          company: "徐州佳成纸业",
          phone: "15688885555",
          industry: "二手设备 废电器",
          address: "河北省 石家庄市 长安区",
          desc: "采购230w-680w单、多晶正A级组件",
          ischat: 0,
          link: "https://www.feijiu.net",
        },
        {
          id: "1042351",
          name: "张志明",
          position: "业务部总经理",
          company: "徐州佳成纸业",
          phone: "15688885555",
          industry: "二手设备 废电器",
          address: "河北省 石家庄市 长安区",
          desc: "采购230w-680w单、多晶正A级组件",
          ischat: 1,
          link: "https://www.feijiu.net",
        },
        {
          id: "1042351",
          name: "张志明",
          position: "业务部总经理",
          company: "徐州佳成纸业",
          phone: "15688885555",
          industry: "二手设备 废电器",
          address: "河北省 石家庄市 长安区",
          desc: "采购230w-680w单、多晶正A级组件",
          ischat: 1,
          link: "https://www.feijiu.net",
        },
        {
          id: "1042352",
          name: "张志明",
          position: "业务部总经理",
          company: "徐州佳成纸业",
          phone: "15688885555",
          industry: "二手设备 废电器",
          address: "河北省 石家庄市 长安区",
          desc: "采购230w-680w单、多晶正A级组件",
          ischat: 1,
          link: "https://www.feijiu.net",
        },
        {
          id: "1042353",
          name: "张志明",
          position: "业务部总经理",
          company: "徐州佳成纸业",
          phone: "15688885555",
          industry: "二手设备 废电器",
          address: "河北省 石家庄市 长安区",
          desc: "采购230w-680w单、多晶正A级组件",
          ischat: 1,
          link: "https://www.feijiu.net",
        },
        {
          id: "1042354",
          name: "张志明",
          position: "业务部总经理",
          company: "徐州佳成纸业",
          phone: "15688885555",
          industry: "二手设备 废电器",
          address: "河北省 石家庄市 长安区",
          desc: "采购230w-680w单、多晶正A级组件",
          ischat: 1,
          link: "https://www.feijiu.net",
        },
      ],
    };
    setTimeout(() => {
      resolve(res);
    }, 500);
  });
}

/**
 * 我的商友录-删除商友
 */
function apiDelCard(data) {
  console.log("apiDelCard", data);
  return new Promise((resolve, reject) => {
    const res = {
      code: 200,
      data: {},
    };
    setTimeout(() => {
      resolve(res);
    }, 500);
  });
}

/**
 * 我的商友录-获取地区
 */
function apiGetAreaList() {
  console.log("apiGetArea");
  return new Promise((resolve, reject) => {
    const res = {
      code: 200,
      data: [
        {
          code: "110000",
          name: "北京市",
          children: [
            { code: "110100", name: "市辖区" },
            { code: "110200", name: "东城区" },
            { code: "110300", name: "西城区" },
            { code: "110400", name: "崇文区" },
            { code: "110500", name: "宣武区" },
            { code: "110600", name: "朝阳区" },
            { code: "110700", name: "丰台区" },
            { code: "110800", name: "石景山区" },
            { code: "110900", name: "海淀区" },
            { code: "111000", name: "门头沟区" },
            { code: "111100", name: "房山区" },
            { code: "111200", name: "通州区" },
            { code: "111300", name: "顺义区" },
            { code: "111400", name: "昌平区" },
            { code: "111500", name: "大兴区" },
            { code: "111600", name: "怀柔区" },
            { code: "111700", name: "平谷区" },
            { code: "111800", name: "密云区" },
            { code: "111900", name: "延庆区" },
            { code: "112000", name: "市辖区" },
            { code: "112100", name: "密云县" },
            { code: "112200", name: "延庆县" },
            { code: "112300", name: "市辖县" },
          ],
        },
        {
          code: "120000",
          name: "天津市",
          children: [
            { code: "120100", name: "市辖区" },
            { code: "120200", name: "和平区" },
            { code: "120300", name: "河东区" },
            { code: "120400", name: "河西区" },
            { code: "120500", name: "南开区" },
            { code: "120600", name: "河北区" },
            { code: "120700", name: "红桥区" },
            { code: "120800", name: "东丽区" },
            { code: "120900", name: "西青区" },
            { code: "121000", name: "津南区" },
            { code: "121100", name: "北辰区" },
          ],
        },
        {
          code: "130000",
          name: "河北省",
          children: [
            { code: "130100", name: "石家庄市" },
            { code: "130200", name: "唐山市" },
            { code: "130300", name: "秦皇岛市" },
            { code: "130400", name: "邯郸市" },
            { code: "130500", name: "邢台市" },
            { code: "130600", name: "保定市" },
            { code: "130700", name: "张家口市" },
            { code: "130800", name: "承德市" },
            { code: "130900", name: "沧州市" },
            { code: "131000", name: "廊坊市" },
            { code: "131100", name: "衡水市" },
          ],
        },
        {
          code: "140000",
          name: "山西省",
          children: [
            { code: "140100", name: "太原市" },
            { code: "140200", name: "大同市" },
            { code: "140300", name: "阳泉市" },
            { code: "140400", name: "长治市" },
            { code: "140500", name: "晋城市" },
            { code: "140600", name: "朔州市" },
            { code: "140700", name: "晋中市" },
            { code: "140800", name: "运城市" },
            { code: "140900", name: "忻州市" },
            { code: "141000", name: "临汾市" },
            { code: "141100", name: "吕梁市" },
          ],
        },
        {
          code: "150000",
          name: "内蒙古自治区",
          children: [
            { code: "150100", name: "呼和浩特市" },
            { code: "150200", name: "包头市" },
            { code: "150300", name: "乌海市" },
            { code: "150400", name: "赤峰市" },
            { code: "150500", name: "通辽市" },
            { code: "150600", name: "鄂尔多斯市" },
            { code: "150700", name: "呼伦贝尔市" },
            { code: "150800", name: "巴彦淖尔市" },
            { code: "150900", name: "乌兰察布市" },
            { code: "151000", name: "兴安盟" },
            { code: "151100", name: "锡林郭勒盟" },
            { code: "151200", name: "阿拉善盟" },
            { code: "151300", name: "巴彦淖尔市" },
            { code: "151400", name: "乌兰察布市" },
            { code: "151500", name: "兴安盟" },
            { code: "151600", name: "锡林郭勒盟" },
            { code: "151700", name: "阿拉善盟" },
          ],
        },
        {
          code: "110000",
          name: "北京市",
          children: [
            { code: "110100", name: "市辖区" },
            { code: "110200", name: "东城区" },
            { code: "110300", name: "西城区" },
            { code: "110400", name: "崇文区" },
            { code: "110500", name: "宣武区" },
            { code: "110600", name: "朝阳区" },
            { code: "110700", name: "丰台区" },
          ],
        },
        {
          code: "120000",
          name: "天津市",
          children: [
            { code: "120100", name: "市辖区" },
            { code: "120200", name: "和平区" },
            { code: "120300", name: "河东区" },
            { code: "120400", name: "河西区" },
            { code: "120500", name: "南开区" },
            { code: "120600", name: "河北区" },
            { code: "120700", name: "红桥区" },
            { code: "120800", name: "东丽区" },
            { code: "120900", name: "西青区" },
            { code: "121000", name: "津南区" },
            { code: "121100", name: "北辰区" },
          ],
        },
        {
          code: "130000",
          name: "河北省",
          children: [
            { code: "130100", name: "石家庄市" },
            { code: "130200", name: "唐山市" },
            { code: "130300", name: "秦皇岛市" },
            { code: "130400", name: "邯郸市" },
            { code: "130500", name: "邢台市" },
            { code: "130600", name: "保定市" },
            { code: "130700", name: "张家口市" },
            { code: "130800", name: "承德市" },
            { code: "130900", name: "沧州市" },
            { code: "131000", name: "廊坊市" },
            { code: "131100", name: "衡水市" },
          ],
        },
        {
          code: "140000",
          name: "山西省",
          children: [
            { code: "140100", name: "太原市" },
            { code: "140200", name: "大同市" },
            { code: "140300", name: "阳泉市" },
            { code: "140400", name: "长治市" },
            { code: "140500", name: "晋城市" },
            { code: "140600", name: "朔州市" },
            { code: "140700", name: "晋中市" },
            { code: "140800", name: "运城市" },
            { code: "140900", name: "忻州市" },
            { code: "141000", name: "临汾市" },
            { code: "141100", name: "吕梁市" },
          ],
        },
        {
          code: "150000",
          name: "内蒙古自治区",
          children: [
            { code: "150100", name: "呼和浩特市" },
            { code: "150200", name: "包头市" },
            { code: "150300", name: "乌海市" },
            { code: "150400", name: "赤峰市" },
            { code: "150500", name: "通辽市" },
            { code: "150600", name: "鄂尔多斯市" },
            { code: "150700", name: "呼伦贝尔市" },
            { code: "150800", name: "巴彦淖尔市" },
            { code: "150900", name: "乌兰察布市" },
            { code: "151000", name: "兴安盟" },
            { code: "151100", name: "锡林郭勒盟" },
            { code: "151200", name: "阿拉善盟" },
            { code: "151300", name: "巴彦淖尔市" },
            { code: "151400", name: "乌兰察布市" },
            { code: "151500", name: "兴安盟" },
            { code: "151600", name: "锡林郭勒盟" },
            { code: "151700", name: "阿拉善盟" },
          ],
        },
        {
          code: "110000",
          name: "北京市",
          children: [
            { code: "110100", name: "市辖区" },
            { code: "110200", name: "东城区" },
            { code: "110300", name: "西城区" },
            { code: "110400", name: "崇文区" },
            { code: "110500", name: "宣武区" },
            { code: "110600", name: "朝阳区" },
            { code: "110700", name: "丰台区" },
          ],
        },
        {
          code: "120000",
          name: "天津市",
          children: [
            { code: "120100", name: "市辖区" },
            { code: "120200", name: "和平区" },
            { code: "120300", name: "河东区" },
            { code: "120400", name: "河西区" },
            { code: "120500", name: "南开区" },
            { code: "120600", name: "河北区" },
            { code: "120700", name: "红桥区" },
            { code: "120800", name: "东丽区" },
            { code: "120900", name: "西青区" },
            { code: "121000", name: "津南区" },
            { code: "121100", name: "北辰区" },
          ],
        },
        {
          code: "130000",
          name: "河北省",
          children: [
            { code: "130100", name: "石家庄市" },
            { code: "130200", name: "唐山市" },
            { code: "130300", name: "秦皇岛市" },
            { code: "130400", name: "邯郸市" },
            { code: "130500", name: "邢台市" },
            { code: "130600", name: "保定市" },
            { code: "130700", name: "张家口市" },
            { code: "130800", name: "承德市" },
            { code: "130900", name: "沧州市" },
            { code: "131000", name: "廊坊市" },
            { code: "131100", name: "衡水市" },
          ],
        },
        {
          code: "140000",
          name: "山西省",
          children: [
            { code: "140100", name: "太原市" },
            { code: "140200", name: "大同市" },
            { code: "140300", name: "阳泉市" },
            { code: "140400", name: "长治市" },
            { code: "140500", name: "晋城市" },
            { code: "140600", name: "朔州市" },
            { code: "140700", name: "晋中市" },
            { code: "140800", name: "运城市" },
            { code: "140900", name: "忻州市" },
            { code: "141000", name: "临汾市" },
            { code: "141100", name: "吕梁市" },
          ],
        },
        {
          code: "150000",
          name: "内蒙古自治区",
          children: [
            { code: "150100", name: "呼和浩特市" },
            { code: "150200", name: "包头市" },
            { code: "150300", name: "乌海市" },
            { code: "150400", name: "赤峰市" },
            { code: "150500", name: "通辽市" },
            { code: "150600", name: "鄂尔多斯市" },
            { code: "150700", name: "呼伦贝尔市" },
            { code: "150800", name: "巴彦淖尔市" },
            { code: "150900", name: "乌兰察布市" },
            { code: "151000", name: "兴安盟" },
            { code: "151100", name: "锡林郭勒盟" },
            { code: "151200", name: "阿拉善盟" },
            { code: "151300", name: "巴彦淖尔市" },
            { code: "151400", name: "乌兰察布市" },
            { code: "151500", name: "兴安盟" },
            { code: "151600", name: "锡林郭勒盟" },
            { code: "151700", name: "阿拉善盟" },
          ],
        },
        {
          code: "110000",
          name: "北京市",
          children: [
            { code: "110100", name: "市辖区" },
            { code: "110200", name: "东城区" },
            { code: "110300", name: "西城区" },
            { code: "110400", name: "崇文区" },
            { code: "110500", name: "宣武区" },
            { code: "110600", name: "朝阳区" },
            { code: "110700", name: "丰台区" },
          ],
        },
        {
          code: "120000",
          name: "天津市",
          children: [
            { code: "120100", name: "市辖区" },
            { code: "120200", name: "和平区" },
            { code: "120300", name: "河东区" },
            { code: "120400", name: "河西区" },
            { code: "120500", name: "南开区" },
            { code: "120600", name: "河北区" },
            { code: "120700", name: "红桥区" },
            { code: "120800", name: "东丽区" },
            { code: "120900", name: "西青区" },
            { code: "121000", name: "津南区" },
            { code: "121100", name: "北辰区" },
          ],
        },
        {
          code: "130000",
          name: "河北省",
          children: [
            { code: "130100", name: "石家庄市" },
            { code: "130200", name: "唐山市" },
            { code: "130300", name: "秦皇岛市" },
            { code: "130400", name: "邯郸市" },
            { code: "130500", name: "邢台市" },
            { code: "130600", name: "保定市" },
            { code: "130700", name: "张家口市" },
            { code: "130800", name: "承德市" },
            { code: "130900", name: "沧州市" },
            { code: "131000", name: "廊坊市" },
            { code: "131100", name: "衡水市" },
          ],
        },
        {
          code: "140000",
          name: "山西省",
          children: [
            { code: "140100", name: "太原市" },
            { code: "140200", name: "大同市" },
            { code: "140300", name: "阳泉市" },
            { code: "140400", name: "长治市" },
            { code: "140500", name: "晋城市" },
            { code: "140600", name: "朔州市" },
            { code: "140700", name: "晋中市" },
            { code: "140800", name: "运城市" },
            { code: "140900", name: "忻州市" },
            { code: "141000", name: "临汾市" },
            { code: "141100", name: "吕梁市" },
          ],
        },
        {
          code: "150000",
          name: "内蒙古自治区",
          children: [
            { code: "150100", name: "呼和浩特市" },
            { code: "150200", name: "包头市" },
            { code: "150300", name: "乌海市" },
            { code: "150400", name: "赤峰市" },
            { code: "150500", name: "通辽市" },
            { code: "150600", name: "鄂尔多斯市" },
            { code: "150700", name: "呼伦贝尔市" },
            { code: "150800", name: "巴彦淖尔市" },
            { code: "150900", name: "乌兰察布市" },
            { code: "151000", name: "兴安盟" },
            { code: "151100", name: "锡林郭勒盟" },
            { code: "151200", name: "阿拉善盟" },
            { code: "151300", name: "巴彦淖尔市" },
            { code: "151400", name: "乌兰察布市" },
            { code: "151500", name: "兴安盟" },
            { code: "151600", name: "锡林郭勒盟" },
            { code: "151700", name: "阿拉善盟" },
          ],
        },
        {
          code: "110000",
          name: "北京市",
          children: [
            { code: "110100", name: "市辖区" },
            { code: "110200", name: "东城区" },
            { code: "110300", name: "西城区" },
            { code: "110400", name: "崇文区" },
            { code: "110500", name: "宣武区" },
            { code: "110600", name: "朝阳区" },
            { code: "110700", name: "丰台区" },
          ],
        },
        {
          code: "120000",
          name: "天津市",
          children: [
            { code: "120100", name: "市辖区" },
            { code: "120200", name: "和平区" },
            { code: "120300", name: "河东区" },
            { code: "120400", name: "河西区" },
            { code: "120500", name: "南开区" },
            { code: "120600", name: "河北区" },
            { code: "120700", name: "红桥区" },
            { code: "120800", name: "东丽区" },
            { code: "120900", name: "西青区" },
            { code: "121000", name: "津南区" },
            { code: "121100", name: "北辰区" },
          ],
        },
        {
          code: "130000",
          name: "河北省",
          children: [
            { code: "130100", name: "石家庄市" },
            { code: "130200", name: "唐山市" },
            { code: "130300", name: "秦皇岛市" },
            { code: "130400", name: "邯郸市" },
            { code: "130500", name: "邢台市" },
            { code: "130600", name: "保定市" },
            { code: "130700", name: "张家口市" },
            { code: "130800", name: "承德市" },
            { code: "130900", name: "沧州市" },
            { code: "131000", name: "廊坊市" },
            { code: "131100", name: "衡水市" },
          ],
        },
        {
          code: "140000",
          name: "山西省",
          children: [
            { code: "140100", name: "太原市" },
            { code: "140200", name: "大同市" },
            { code: "140300", name: "阳泉市" },
            { code: "140400", name: "长治市" },
            { code: "140500", name: "晋城市" },
            { code: "140600", name: "朔州市" },
            { code: "140700", name: "晋中市" },
            { code: "140800", name: "运城市" },
            { code: "140900", name: "忻州市" },
            { code: "141000", name: "临汾市" },
            { code: "141100", name: "吕梁市" },
          ],
        },
        {
          code: "150000",
          name: "内蒙古自治区",
          children: [
            { code: "150100", name: "呼和浩特市" },
            { code: "150200", name: "包头市" },
            { code: "150300", name: "乌海市" },
            { code: "150400", name: "赤峰市" },
            { code: "150500", name: "通辽市" },
            { code: "150600", name: "鄂尔多斯市" },
            { code: "150700", name: "呼伦贝尔市" },
            { code: "150800", name: "巴彦淖尔市" },
            { code: "150900", name: "乌兰察布市" },
            { code: "151000", name: "兴安盟" },
            { code: "151100", name: "锡林郭勒盟" },
            { code: "151200", name: "阿拉善盟" },
            { code: "151300", name: "巴彦淖尔市" },
            { code: "151400", name: "乌兰察布市" },
            { code: "151500", name: "兴安盟" },
            { code: "151600", name: "锡林郭勒盟" },
            { code: "151700", name: "阿拉善盟" },
          ],
        },
      ],
    };
    setTimeout(() => {
      resolve(res);
    }, 500);
  });
}

/**
 * 我的商友录-获取行业
 */
function apiGetIndustryList() {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve({
        code: 200,
        data: [
          { id: "1", name: "废金属" },
          { id: "2", name: "二手设备" },
          { id: "3", name: "库存物资" },
          { id: "4", name: "旧纺织皮革" },
          { id: "5", name: "废旧橡胶轮胎" },
          { id: "6", name: "玻璃与木制品" },
          { id: "7", name: "其他" },
        ],
      });
    }, 500);
  });
}

/**
 * 留言询盘
 * @param {*} uid 公司id
 * @param {*} name 联系人
 * @param {*} phone 联系电话
 * @param {*} desc 补充内容
 */
function apiLeavaMessage(data) {
  console.log("apiLeavaMessage", data);
  return new Promise((resolve, reject) => {
    const res = { code: 200, msg: "提交成功" };
    setTimeout(() => {
      resolve(res);
    }, 500);
  });
}

/**
 * 获取用户信息
 */
function apiGetUserInfo() {
  return new Promise((resolve, reject) => {
    const res = {
      code: 200,
      msg: "获取成功",
      data: { name: "张三", phone: "13800138000" },
    };
    setTimeout(() => {
      resolve(res);
    }, 500);
  });
}
